#ifndef STU_TEXTURE__H
#define STU_TEXTURE__H

#include "Defines.h"
#include <string>

#define getFilteredColor(color, filter) ((color) & (filter))
#define getRed(color) getFilteredColor((color), 0xff0000)
#define getBlue(color) getFilteredColor((color), 0x0000ff)
#define getGreen(color) getFilteredColor((color), 0x00ff00)

class ENGINE_API Texture
{
	std::string * filename;
	DWORD colorKey;
	float h, w;//height, width

public:

	SMARTPOINTER(Texture, tex_ptr)
	//typedef boost::shared_ptr<Texture> tex_ptr;

	Texture() { 
		filename = NULL;
		colorKey = 0;
	}

	Texture(const char * file, DWORD colorKey){
		filename = new std::string(file);
		this->colorKey = colorKey;
	}

	~Texture(){
		if(filename) delete filename;
	}

	DWORD getColorKey() {return colorKey;}
	std::string * getFilename() {return filename;}
	void setHeight(float height) {h = height;}
	void setWidth(float width) {w = width;}
	float getHeight() { return h;}
	float getWidth() { return w;}
};

typedef ENGINE_API Texture::tex_ptr tex_ptr;

#endif